<?php

require_once "vendor/autoload.php";

$time = date("Y-m-d H:i:s", strtotime("+1 day"));

$token = "8720c4aec1556d2b3d9f094e914568a2*1400564275";

// 房间ID
$roomId = "room_5g2pSf4F";

// 用户ID
$userID = "5g2pSf4F";

// 推流地址
$pushUrl = "rtmp://149705.livepush.myqcloud.com/live/1400564275_5g2pSf4F?txSecret=01f5018a0052450eefa8eb71bf255726&txTime=6124A922";

$config = ['sdkAppId'=>'1400564275','secretKey'=>'139c65b70ab8830221d4b9a9691ebabb59f15442afad3752288e9314a268e402'];
//$response = \CymTools\Factory::live($config)->liveRoom->setToken($token)->createRoom('5g2pSf4F','测试测试');
//$response = \CymTools\Factory::live($config)->liveRoom->setToken($token)->destroyRoom('room_5g2pSf4F', '5g2pSf4F');
//$response = \CymTools\Factory::live($config)->liveRoom->setToken($token)->getAnchorUrl('5g2pSf4F');
$response = \CymTools\Factory::live($config)->liveRoom->setToken($token)->getAnchors('room_5g2pSf4F', '5g2pSf4F');
//$response = \CymTools\Factory::live($config)->liveRoom->setToken($token)->addAnchor($roomId,$userID,'飞鸟和鱼', $pushUrl, 'https://pic2.zhimg.com/80/v2-6a3758287123d9978bc5f5b5ea9090c0_720w.jpg');

var_dump($response->getBody()->getContents());